<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<!-- 必须包含命名空间声明 -->
<body>
<nav th:fragment="navbar" class="navbar navbar-expand-lg bg-body-tertiary">
  <!-- 导航栏内容 -->
</nav>
</body>
</html>